package com.yuanfeng.base.controller;

import com.yuanfeng.commoms.dto.goods.WebGoodsListQueryDTO;
import com.yuanfeng.commoms.dto.shop.WebShopListQueryDTO;
import com.yuanfeng.commoms.dto.userms.UserTokenBeanDTO;
import com.yuanfeng.commoms.util.ResponseResult;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName MarketIndexController
 * @Description 批发市场
 * @Author cyp
 * @Date 2023/6/16 13:53
 * @Version 1.0
 */
@RestController
@RequestMapping("/market/index")
public class MarketIndexController extends BaseController {

    /**
     * 批发市场 首页关键词 导航 分类
     * @return
     */
    @GetMapping(value = "/queryIndex")
    public ResponseResult queryIndex() {
        return marketIndexService.queryIndex();
    }
    /**
     * 批发市场 首页商品楼层信息
     * @return
     */
    @PostMapping("/queryAllAdpageFloor")
    public ResponseResult queryAllAdpageFloor(@RequestBody UserTokenBeanDTO userTokenBean) {
        return marketIndexService.queryAllAdpageFloor(userTokenBean);
    }
    /**
     * 批发市场  商品列表页
     * @param param
     * @return
     */
    @PostMapping("/queryGoodsListFilter")
    public ResponseResult queryGoodsListFilter(@RequestBody WebGoodsListQueryDTO param) throws IllegalAccessException {
        return marketIndexService.queryGoodsListFilter(param);
    }
    /**
     * 批发市场  店铺列表页
     * @param param
     * @return
     */
    @PostMapping("/queryShopListFilter")
    public ResponseResult queryShopListFilter(@RequestBody WebShopListQueryDTO param) throws IllegalAccessException {
        return marketIndexService.queryShopListFilter(param);
    }

    /**
     * 查询批发市场 热搜词和导航信息接口
     * @return
     */
    @GetMapping("/queryPlatformNav")
    public ResponseResult queryPlatformNav() {

        return marketIndexService.queryPlatformNav();
    }
}
